<template>
	<view class="noticecontent">
    <statusBar></statusBar>
    <uni-nav-bar left-icon="back" :title="noticeInfo.name"></uni-nav-bar>
    <view class="main">
    	<view class="person">作者 : {{noticeInfo.person}}</view>
      <view class="time">时间 : {{noticeInfo.time}}</view>
      <view class="">详情 ：</view>
      <view class="content">
      	{{noticeInfo.content}}
      </view>
    </view>
	</view>
</template>

<script>
  import statusBar from "@/components/status-bar.vue"
	export default {
    components:{
      statusBar
    },
		data() {
			return {
        noticeInfo: []
			};
		},
    onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
        this.noticeInfo = option;
        //console.log(option); //打印出上个页面传递的参数。
        this.title = option.name;
    },
    created() {
    	this.submitReadNotice();
    },
    methods:{
     submitReadNotice: function(){
       uni.request({
         method: 'GET',
         header: {
           'Content-Type': 'application/json',
           'Authorization': uni.getStorageSync('token')
         },
         url: this.apiUrl + 'api/student/Notice/SubmitReadNotice', 
         data: {
           noticeId: this.noticeInfo.id,
         },
         success: res => {
           console.log(res);
           if(res.data.state == "success"){
            
           }else{
             
           }
         }
       });
     }
    }
	}
</script>

<style scoped>
  .line{
    height: 15upx;
  }
  .main{
    padding: 50upx;
    background-color: #FFFFFF;
  }
  

</style>
